﻿using System.Windows;

using boda.net.wpf.application.main;
using boda.net.wpf.application.task;
using boda.net.wpf.core;
using boda.net.wpf.hmapplication.Views;
using boda.net.wpf.menu;

using Prism.Ioc;
using Prism.Modularity;
using Prism.Unity;

namespace boda.net.wpf.hmapplication;
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : PrismApplication
{
    protected override Window CreateShell()
    {
        return new MainView();
    }


    protected override void RegisterTypes(IContainerRegistry containerRegistry)
    {

    }

    protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
    {
        base.ConfigureModuleCatalog(moduleCatalog);

        // 加载登录界面，登陆成功会加载主界面模块，主界面模块会加载主界面区域
        moduleCatalog.AddModule<CoreModule>();
        // 3(3). 加载模块区域
        moduleCatalog.AddModule<ApplicationMainModule>();
        moduleCatalog.AddModule<ApplicationLoginModule>();
        moduleCatalog.AddModule<ApplicationTaskModule>();

        moduleCatalog.AddModule<ApplicationMenuModule>();
    }

    // 加载本地文件夹中的模块，插件式开发
    protected override IModuleCatalog CreateModuleCatalog()
    {
        return base.CreateModuleCatalog();
    }
}
